<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {

    protected function _initDb() {
        $dbAdapter = new Zend_Db_Adapter_Pdo_Mysql(array(
            'host' => 'localhost',
            'username' => 'root',
            'password' => '',
            'dbname' => 'SimpleBlog'
        ));
        Zend_Registry::set('dbAdapter', $dbAdapter);
    }

    protected function _initLoadPlugin() {
        $front = Zend_Controller_Front::getInstance();
        $front->registerPlugin(new Plugin());
    }

    protected function _initRedis() {
        $dbRedis = new Redis();
        $dbRedis->connect('127.0.0.1');
        $dbRedis->incr('counters');
        Zend_Registry::set('dbRedis', $dbRedis);
    }

}
